<template>
	<view>
		<view class="plr20 ptb20" style="position: relative;" v-if="tabsindex == 0">
			<!-- 固定新增按钮 -->
			<image class="iconImg" src="../../../static/iconAdd.png" @click="iconAdd(tabsindex)">
			</image>
			<view class="boxItem mb20" v-for="item in 3" @click="itemDetails(item,tabsindex)">
				<view class="flex mb20">
					<view class="name w160">企业名称：</view>
					<view class="value">国网福建省电力公司信息通信分公司</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">统一社会信用代码：</view>
					<view class="value">91440300MA5H3J122K</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">注册资本(万元)：</view>
					<view class="value">200</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">法人代表：</view>
					<view class="value">周铮</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">营业期限：</view>
					<view class="value">2021-11-30</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">单位地址：</view>
					<view class="value">国网福建省电力公司信息通信分公司福州鼓楼区观风亭街6号恒力金融中心6层国网</view>
				</view>
			</view>
		</view>

		<view class="plr20 ptb20" style="position: relative;" v-else>
			<!-- 固定新增按钮 -->
			<image class="iconImg" src="../../../static/iconAdd.png" @click="iconAdd(tabsindex)">
			</image>
			<view class="boxItem mb20" v-for="item in 2" @click="itemDetails(item,tabsindex)">
				<!-- 外包人员头像 -->
				<image class="peopleImg" src="https://cdn.uviewui.com/uview/album/1.jpg">
				</image>
				<view class="flex mb20">
					<view class="name w160">姓名：</view>
					<view class="value">王世杰</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">性别：</view>
					<view class="value">男</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">手机号码：</view>
					<view class="value">18013022628</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">出生年月日：</view>
					<view class="value">1993.04.05</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">身份证号：</view>
					<view class="value">370921192401104783</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">所属单位：</view>
					<view class="value">南瑞集团</view>
				</view>
				<view class="flex mb20">
					<view class="name w160">单位地址：</view>
					<view class="value">国网福建省电力公司信息通信分公司福州鼓楼区观风亭街6号恒力金融中心6层国网</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			tabsindex: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			itemDetails(val,index) {
				this.$emit('itemDetails',val,index)
			},
			iconAdd(index) {
				this.$emit('iconAdd',index)
			}
		},
	}
</script>

<style>
	.boxItem {
		padding: 30rpx;
		background-color: #fff;
		box-shadow: 0 2px 4px 0 rgba(237, 237, 237, 0.50);
		border-radius: 16rpx;
		position: relative;
	}

	.name {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #89939E;
		padding-right: 20rpx;
	}

	.value {
		flex: 1;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
	}

	.iconImg {
		width: 140rpx;
		height: 140rpx;
		position: fixed;
		top: 1000rpx;
		right: 40rpx;
		z-index: 999
	}

	.peopleImg {
		width: 180rpx;
		height: 220rpx;
		position: absolute;
		top: 20rpx;
		right: 20rpx;
	}
</style>
